<template>
  <div class="home">
    <Monitor></Monitor>
    <Search></Search>
    <Keyword></Keyword>
  </div>
</template>

<script lang="ts">
import Monitor from './monitor/index.vue'
import Search from './search/index.vue'
import Keyword from './keyword/index.vue'
export default {
  name: 'Home',
  components: { Monitor, Search, Keyword },
}
</script>
<script lang="ts" setup>
import { useUserInfoStore } from '@/stores/userInfo'
import { onMounted } from 'vue'
import { useReportDataStore } from '@/stores/reportData'
// 创建reportStore实例对象
const reportDataStore = useReportDataStore()

const userInfoStore = useUserInfoStore()

// 1. 当页面组件挂载完毕的时候，要发送请求
onMounted(() => {
  reportDataStore.getReportData()
})
</script>

<style scoped>
.home {
  width: 100%;
  height: 100%;
  padding: 20px;
  background-color: #eee;
}
</style>
